package at.fhooe.stefanirndorfer.walls;

import at.fhooe.stefanirndorfer.entity.Entity;

public class Collission {

	public static boolean hasCollision(double[] point, Entity e){
		double x = point[0];
		double y = point[1];
		double upperLeftX = e.getPosX();
		double lowerRightX = e.getPosX() + e.getWidth();
		double upperLeftY = e.getPosY();
		double lowerRightY = e.getPosY() - e.getHeight();
		
		return ((x >= upperLeftX && x <= lowerRightX) && (y <= upperLeftY && y >= lowerRightY));

	}
}
